package com.cyzy.utils;

import com.alibaba.fastjson.JSON;
import com.cyzy.dto.ResultMessage;

/**
 * @author cuncun
 * @create 2025-05-29 下午8:08
 */
public class MessageUtils {

    /*
    * isSystemMessage:是不是系统消息
    * */
    public static String getMessage(boolean isSystemMessage,String fromName, Object message) {

        ResultMessage result = new ResultMessage();
        result.setSystem(isSystemMessage);
        result.setMessage(message);
        if (fromName != null){
            result.setFromName(fromName);
        }
        return JSON.toJSONString(result);
    }
}
